<div id="buy_${buy.id}_edit" width="750">
  <table>
    <tr>
      <td colspan="8">
        <a href="${buy.stock.url}" target="_blank">
${buy.stock}
        </a>
      </td>
    </tr>
    <tr>
    <td width="50">
${buy.count}
    </td>
    <td width="50">
${buy.price}kr
    </td>
    <td width="50">
${buy.stock.value}kr
    </td>
    <td width="50">
${buy.stock.time}
    </td>
    <td width="150">
${buy.value()}kr
    </td>
    <td width="150">
${buy.profit()}kr (${buy.profitProc()}%)
    </td>
    <td width="150">
${buy.targetValue()}kr
    </td>
    <td width="100" style="text-align: right;">
      <g:remoteLink controller="buy" action="edit" id="${buy.id}" update="buy_${buy.id}_edit">
        Edit
      </g:remoteLink>,
      <g:remoteLink controller="buy" action="delete" id="${buy.id}" onSuccess="${remoteFunction(controller:'investments',action:'allcurrent',update:'main')};">
        Remove
      </g:remoteLink>
    </td>
    </tr>
    <tr>
      <td colspan="8">
    <g:investment_status
      width="750"
      height="5"
      neg_color="red"
      pos_color="green"
      acc="${buy.price}"
      target="${buy.target}"
      value="${buy.stock.value*buy.stock.currency.sek}"/>
    </td>
    </tr>
  </table>
</div>
